// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import vuex from 'vuex'
import store from './store/store'
import animated from 'animate.css' // npm install animate.css --save安装，在引入
 
Vue.use(animated)
Vue.use(vuex)

Vue.config.productionTip = false

//路由守卫
router.beforeEach((to,from,next)=>{
  console.log(to);
  // if(to.fullPath =='/life'){
  //    next()
  // }else{
  //   next('/')
  // }
  next()
  
})
router.beforeResolve((to, from, next) => {
  console.log('beforeResolve');
  next()
})
router.afterEach((to, from) => {

  console.log('afterEach');
  

})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>',

})


